import request from '@/sheep/request';

export default {
    // 合同列表
    getAttachmentIndex: (params) =>
    request({
        url: 'api/contract/index',
        method: 'GET',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: false,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
    // 合同分类
    getContractCategoryList: (params) =>
    request({
        url: 'api/contract_category/index',
        method: 'GET',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: false,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
    // 合同详情
    getAttachmentView: (params) =>
    request({
        url: 'api/contract/view',
        method: 'GET',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: false,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
    // 劳务派遣合同列表
    getContractIndex: (params) =>
    request({
        url: 'api/dispatch/index',
        method: 'GET',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: false,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
    // 劳务派遣合同详情
    getDispatchView: (params) =>
    request({
        url: 'api/dispatch/view',
        method: 'GET',
        params,
        custom: {
            showLoading: true,
            loadingMsg: '加载中',
            showError: true,
            showSuccess: false,
            errorMsg: '',
            auth: true,
            successMsg: false,
        },
    }),
    // 外包合同列表
    getEpibolyIndex: (params) =>
        request({
            url: 'api/epiboly/index',
            method: 'GET',
            params,
            custom: {
                showLoading: true,
                loadingMsg: '加载中',
                showError: true,
                showSuccess: false,
                errorMsg: '',
                auth: true,
                successMsg: false,
            },
        }),
}